<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {

            width: 400px;
            height: 400px;
        }

        .box1 {
            background: red;
            margin-bottom: 100px;
        }

        .box2 {
            background: blue;
            margin-top: 100px;
        }
    </style>
</head>

<body>
    <!-- 垂直布局 的 块级元素，上下的margin会合100 -->
    <div class="box1"></div>
    <div class="box2"></div>
</body>

</html>